<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>

		<div class="title"><span>User</span></div>
          <div id="content_body">
          	<div class="content_admin_sub">
          	  <div class="border_solid"></div>
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="title">
			  <tr>
				<td width="6" class="bg_left"></td>
				<td width="980" style="padding-left:5px;" class="blue_dark_11_bold">Search User</td>
				<td width="6" class="bg_right"></td>
			  </tr>
			</table>
			</div>
          	<div class="content_admin_sub">
            	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="createuser">
			  <tr>
			    <td width="156">&nbsp;</td>
			    <td width="133">Ten dang nhap</td>
			    <td width="223">
					<span class="input_div2" style="width:143px;#width:143px;_#width:140px;line-height:23px;"><b>
					  <input class="input" type="text" name="textfield2" id="textfield2" style="width:133px;#width:133px;_width:130px;"/></b>			</span>				</td>
			    <td width="17">&nbsp;</td>
			    <td width="108">Chu tai khoan </td>
			    <td>
					<span class="input_div2" style="width:143px;#width:143px;_#width:140px;line-height:23px;"><b>
					  <input class="input" type="text" name="textfield2" id="textfield2" style="width:133px;#width:133px;_width:130px;"/></b>			</span></td>
			    </tr>
			  <tr>
			    <td>&nbsp;</td>
			    <td>So CMND </td>
			    <td><span class="input_div2" style="width:143px;#width:143px;_#width:140px;line-height:23px;"><b>
					  <input class="input" type="text" name="textfield2" id="textfield2" style="width:133px;#width:133px;_width:130px;"/></b>			</span></td>
			    <td>&nbsp;</td>
			    <td>So tai khoan </td>
			    <td>
					<span class="input_div2" style="width:143px;#width:143px;_#width:140px;line-height:23px;"><b>
					  <input class="input" type="text" name="textfield2" id="textfield2" style="width:133px;#width:133px;_width:130px;"/></b>			</span>				</td>
			    </tr>
			  <tr>
			    <td>&nbsp;</td>
			    <td colspan="3" rowspan="2" align="right"><br />
			      <input type="submit" name="add22" value="Search" class="button3"/></td>
			    <td rowspan="2">&nbsp;</td>
			    <td rowspan="2">&nbsp;</td>
			  </tr>
			  <tr>
			    <td>&nbsp;</td>
			    </tr>			  
			</table>
            	<div class="border_solid"></div>
            </div>
            <div class="content_admin_sub">
            <c:if test="${!empty userList}">
            <div style="text-align: left; padding-bottom:10px; font-size:13px; font-weight: bold;">
			Tong so user online:&nbsp;<f:formatNumber pattern="###,###" value="${numberOnline}"/>
			</div>
			<table id="userListDisplay" width="100%" border="0" cellpadding="0" cellspacing="0" class="tablecontent">
			  <tbody>
			  <tr>
			    <td width="5%" class="head"><input type="checkbox" name="checkbox" value="checkbox" /></td>
				<td width="10%" class="head">user name </td>
				<td width="15%" class="head">Full name</td>
				<td width="10%" class="head">Gioi Tinh</td>
				<td width="20%" class="head">Email</td>
				<td width="13%" class="head">User Type</td>
				<td width="10%" class="head">Status</td>
				<td width="10%" class="head">Created Date</td>
				<td width="7%" class="head_last">Actived</td>
				</tr>
				<c:forEach items="${userList}" var="item" varStatus="rowIndex">
					<c:choose>
						<c:when test="${(rowIndex.count mod 2) == 0}">
							<c:set var="className" value="row1"/>
						</c:when>
						<c:otherwise>
							<c:set var="className" value="row2"/>
						</c:otherwise>
					</c:choose>
				  <tr>
				    <td class="${className} center"><input id="user_checked_${idx}" type="checkbox" name="checkbox" value="checkbox" /></td>
					<td class="${className}" align="left">${item.userName}</td>
					<td class="${className}" align="left">${item.fullName}</td>
					<td class="${className}" align="left"><c:choose>
						<c:when test="${item.gender == 'M'}">Nam</c:when>
						<c:otherwise>Nu</c:otherwise>
					</c:choose></td>
					<td class="${className}" align="left">${item.email}</td>
					<td class="${className}" align="left">${item.userType}</td>
					<td class="${className}" align="left">${item.isOnline}</td>
					<td class="${className}" align="left">${item.createdDate}</td>
					<td class="${className}_last center">${item.isActived}</td>
				</tr>
				</c:forEach>			  
			  <tbody>
			</table>
			</c:if>	
			<div class="paging1" align="center">
			  <img src="<%=request.getContextPath()%>/resources/images/page0_invi_first.png" alt="First" width="10" height="13" />&nbsp;&nbsp;&nbsp;
			  <img src="<%=request.getContextPath()%>/resources/images/page0_invi_previous.png" alt="Previous" width="8" height="13" /> &nbsp;&nbsp;&nbsp;
				<span>1</span> | <a href="#" class="links">2</a> | <a href="#" class="links">3</a> | 
				<a href="#" class="links">4</a> | <a href="#" class="links">5</a> &nbsp;&nbsp;&nbsp;
			  <img src="<%=request.getContextPath()%>/resources/images/page0_avai_next.png" alt="Next" width="8" height="13" />&nbsp;&nbsp;&nbsp;
			  <img src="<%=request.getContextPath()%>/resources/images/page0_avai_last.png" alt="Last" width="10" height="13" />
			</div>
		</div>
     </div>